<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
<script src="./js/axios.min.js"></script>
    <script>
	//请求超时
	axios.defaults.timeout=5000
	//配置全局域名
	axios.defaults.baseURL='http://localhost:3000'
	//配置请求头
	axios.defaults.headers['mytoken']='12345'
	axios.get('/axios-json').then((data)=>{
		console.log(data.data)
	})
    </script>	
</body>

</html>